home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 103
/
Vol 103.iso
/
games
/
tontie_h.swf
/
scripts
/
DefineSprite_156
/
frame_4
/
DoAction.as
Wrap
Text File
|
2010-03-13
|
3KB
|
108 lines
with(doka)
{
gotoAndPlay("on");
}
if(_parent.enemy_i == 0)
{
_root.damage(_root.karaburi);
_parent.se = "karaburi";
}
else if(_parent.enemy_i == 1)
{
if(_parent.hit == 1)
{
_parent.hp -= _root.attack;
if(_parent.hp <= 0)
{
_parent.se = "todome";
_parent.attack = 0;
_root.score += _parent.score;
with(_parent.dodai_all.enemy_all.enemy)
{
gotoAndStop("die");
}
}
else
{
_parent.se = "hit";
}
}
else if(_parent.hit != 2)
{
if(_parent.hit == 3)
{
_parent.hp -= _root.attack;
if(_parent.hp <= 0)
{
_parent.se = "todome";
_parent.attack = 0;
_root.score += _parent.score;
with(_parent.dodai_all.enemy_all.enemy)
{
gotoAndStop("die");
}
}
else if(_parent.sikaesi != "coin")
{
_parent.se = "damage";
_root.damage(_parent.sikaesi);
}
else if(_root.money > 0)
{
_parent.se = "damage_coin";
_root.damage_coin();
with(_parent.dodai_all.enemy_all.enemy.char)
{
gotoAndPlay("on");
}
}
}
else if(_parent.hit == "bakudan")
{
_parent.se = "bokan";
_parent.hp -= _root.attack;
_root.damage(_parent.sikaesi);
_parent.attack = 0;
_root.score += _parent.score;
with(_parent.dodai_all.enemy_all.enemy.i)
{
gotoAndPlay("bokan");
}
}
else if(_parent.hit == "shop")
{
stopAllSounds();
_parent.se = "shop_in";
_root.mogura_on = 100;
_root.piko_ok = 0;
_root.piko = [];
_root.lv_con = _root.lv_up.sikaku.k;
with(_root.up_boad)
{
gotoAndPlay("shop");
}
}
}
}
else
{
if(_parent.item_i == "life")
{
_parent.se = "life_get";
_root.kaihuku(_parent.up_i);
_parent.enemy_i = 0;
}
else if(_parent.item_i == "coin")
{
_parent.se = "coin_get";
_root.money += _parent.up_i;
_parent.enemy_i = 0;
}
_parent.dodai_all.joutai = "down";
with(_parent.dodai_all.enemy_all.enemy.i)
{
gotoAndStop("non");
}
}
_root.sound(_parent.se);